label: max-width-chars has no effect on smaller text
authorBenjamin Otte <otte@redhat.com>
Sat, 6 Nov 2021 15:17:59 +0000 (16:17 +0100)
committerBenjamin Otte <otte@redhat.com>
Tue, 9 Nov 2021 02:41:43 +0000 (03:41 +0100)
commitcce6a603a6aa054d2d5aaaf9b3b0671cb6a9970c
tree7af2d46b92d386adb529ea6ebe921f56e549f08b
parent27d286eb7a6fda4da0ecb4e5de3c3307ae02d49b
label: max-width-chars has no effect on smaller text

Having a short text and a large max-width-chars should request the
natural width of the text, not the limit from max-width-chars.

This caused huge message dialogs.

Reftests added.
gtk/gtklabel.c
testsuite/reftests/label-huge-max-width-chars.ref.ui [new file with mode: 0644]
testsuite/reftests/label-huge-max-width-chars.ui [new file with mode: 0644]
testsuite/reftests/label-wrapped-huge-max-width-chars.ref.ui [new file with mode: 0644]
testsuite/reftests/label-wrapped-huge-max-width-chars.ui [new file with mode: 0644]
testsuite/reftests/meson.build